import http from '@/api';

// 新增新闻
export const addNews = data => {
  return http.post('/adminApi/news/add', data);
};

// 删除新闻
export const deleteNews = data => {
  return http.post('/adminApi/news/delete', data);
};

// 修改新闻
export const editNews = data => {
  return http.post('/adminApi/news/edit', data);
};

// 获取新闻列表
export const getNewsList = data => {
  return http.post('/adminApi/news/list', data);
};
//发布新闻
export const publishNews = data => {
  return http.post('/adminApi/news/publish', data);
};

// 查询新闻详情
export const getNewsDetail = data => {
  return http.post('/adminApi/news/findById', data);
};

// 是否置顶
export const isTopNews = data => {
  return http.post('/adminApi/news/isTop', data);
};
